package cn.dengta.webapp.trade.dto;

import java.io.Serializable;

import cn.dengta.common.model.ValueProxy;
import cn.dengta.common.model.ValueProxyImpl;
import lombok.Getter;
import lombok.Setter;

/**
 * @author lizhichao
 * @since 2024-05-13
 */
@Setter
@Getter
public class RiskEventLog implements Serializable {

	/** 用户ID */
	String userId;
	/** 用户昵称 */
	String nickname;
	/** 触发类型 */
	Integer type;
	/** 触发内容 */
	String content;
	/** 马甲 */
	String weskit;

	@Getter
	public enum RiskEventType implements ValueProxyImpl<RiskEventType, Integer> {

		/** 充值问答 */
		RECHARGE_QA("充值问答"),
		/** 礼物限额 */
		GIFT_LIMIT("礼物限额"),
		/** 充值限额 */
		RECHARGE_LIMIT("充值限额"),
		/** 大额弹窗 */
		LARGE_AMOUNT_POPUP("大额弹窗");

		public final String label;
		public final ValueProxy<RiskEventType, Integer> proxy;

		RiskEventType(String label) {
			this.label = label;
			this.proxy = new ValueProxy<>(this, ordinal(), label);
		}

		public static RiskEventType of(Integer type) {
			return RECHARGE_QA.getValueOf(type);
		}
	}
}
